package org.jivesoftware.smackx.pubsub;

import org.jivesoftware.smackx.pubsub.packet.PubSubNamespace;

public enum PubSubElementType
{
  private String eName;
  private PubSubNamespace nSpace;

  static
  {
    CONFIGURE = new PubSubElementType("CONFIGURE", 3, "configure", PubSubNamespace.BASIC);
    CONFIGURE_OWNER = new PubSubElementType("CONFIGURE_OWNER", 4, "configure", PubSubNamespace.OWNER);
    CONFIGURATION = new PubSubElementType("CONFIGURATION", 5, "configuration", PubSubNamespace.EVENT);
    OPTIONS = new PubSubElementType("OPTIONS", 6, "options", PubSubNamespace.BASIC);
    DEFAULT = new PubSubElementType("DEFAULT", 7, "default", PubSubNamespace.OWNER);
    ITEMS = new PubSubElementType("ITEMS", 8, "items", PubSubNamespace.BASIC);
    PUBLISH = new PubSubElementType("PUBLISH", 9, "publish", PubSubNamespace.BASIC);
    PUBLISH_OPTIONS = new PubSubElementType("PUBLISH_OPTIONS", 10, "publish-options", PubSubNamespace.BASIC);
    PURGE_OWNER = new PubSubElementType("PURGE_OWNER", 11, "purge", PubSubNamespace.OWNER);
    PURGE_EVENT = new PubSubElementType("PURGE_EVENT", 12, "purge", PubSubNamespace.EVENT);
    RETRACT = new PubSubElementType("RETRACT", 13, "retract", PubSubNamespace.BASIC);
    AFFILIATIONS = new PubSubElementType("AFFILIATIONS", 14, "affiliations", PubSubNamespace.BASIC);
    SUBSCRIBE = new PubSubElementType("SUBSCRIBE", 15, "subscribe", PubSubNamespace.BASIC);
    SUBSCRIPTION = new PubSubElementType("SUBSCRIPTION", 16, "subscription", PubSubNamespace.BASIC);
    SUBSCRIPTIONS = new PubSubElementType("SUBSCRIPTIONS", 17, "subscriptions", PubSubNamespace.BASIC);
    UNSUBSCRIBE = new PubSubElementType("UNSUBSCRIBE", 18, "unsubscribe", PubSubNamespace.BASIC);
    PubSubElementType[] arrayOfPubSubElementType = new PubSubElementType[19];
    arrayOfPubSubElementType[0] = CREATE;
    arrayOfPubSubElementType[1] = DELETE;
    arrayOfPubSubElementType[2] = DELETE_EVENT;
    arrayOfPubSubElementType[3] = CONFIGURE;
    arrayOfPubSubElementType[4] = CONFIGURE_OWNER;
    arrayOfPubSubElementType[5] = CONFIGURATION;
    arrayOfPubSubElementType[6] = OPTIONS;
    arrayOfPubSubElementType[7] = DEFAULT;
    arrayOfPubSubElementType[8] = ITEMS;
    arrayOfPubSubElementType[9] = PUBLISH;
    arrayOfPubSubElementType[10] = PUBLISH_OPTIONS;
    arrayOfPubSubElementType[11] = PURGE_OWNER;
    arrayOfPubSubElementType[12] = PURGE_EVENT;
    arrayOfPubSubElementType[13] = RETRACT;
    arrayOfPubSubElementType[14] = AFFILIATIONS;
    arrayOfPubSubElementType[15] = SUBSCRIBE;
    arrayOfPubSubElementType[16] = SUBSCRIPTION;
    arrayOfPubSubElementType[17] = SUBSCRIPTIONS;
    arrayOfPubSubElementType[18] = UNSUBSCRIBE;
    ENUM$VALUES = arrayOfPubSubElementType;
  }

  public static PubSubElementType valueOfFromElemName(String paramString1, String paramString2)
  {
    String str;
    PubSubElementType localPubSubElementType;
    int i = paramString2.lastIndexOf(35);
    if (i == -1)
    {
      str = null;
      if (str == null)
        break label64;
      localPubSubElementType = valueOf(paramString1 + '_' + str.toUpperCase());
    }
    while (true)
    {
      while (true)
      {
        return localPubSubElementType;
        str = paramString2.substring(i + 1);
      }
      label64: localPubSubElementType = valueOf(paramString1.toUpperCase().replace('-', '_'));
    }
  }

  public String getElementName()
  {
    return this.eName;
  }

  public PubSubNamespace getNamespace()
  {
    return this.nSpace;
  }
}